//
//  ContentViewController.swift
//  3DTouch
//
//  Created by yaqiang bi on 2017/5/19.
//  Copyright © 2017年 yaqiang bi. All rights reserved.
//

import UIKit

class ContentViewController: UIViewController{
    var index : Int?
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.purple
        print(index ?? "-1")
        
    }
    
    override var previewActionItems: [UIPreviewActionItem]{
        let deleteAction =  UIPreviewAction(title: "删除",
                                            style: UIPreviewActionStyle.destructive,
                                            handler: {
                                                (previewAction,viewController) in
                                                
                                                NSLog("Delete")
                                                
        })
        
        let doneAction = UIPreviewAction(title: "完成",
                                         style: UIPreviewActionStyle.default,
                                         handler: {
                                            (previewActin, viewController) in
                                            
                                            NSLog("Done")
        })
        
        return [doneAction, deleteAction]
    }
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
